#pragma once

#include "DirectX\Material.h"
#include "NeroGame\NFactory.h"
namespace Graphics
{
	class Shader;
	class RenderableEntity;
}

#ifdef DX_11

namespace Graphics
{
class TextureMaterial : public Graphics::Material
{
	RTTI_DECLARATIONS(TextureMaterial, Graphics::Material)
public:
	TextureMaterial(void);
	virtual ~TextureMaterial(void);
	virtual void Initialize();
	virtual void Deinitialize();
	virtual void Update(Graphics::RenderableEntity* entity);
	virtual void Render(Graphics::RenderableEntity* entity);
protected:
	virtual void BeginRender();
	virtual void EndRender();
};
}
#elif defined(DX_9)
namespace Graphics
{
class TextureMaterial : public Graphics::Material
{
	RTTI_DECLARATIONS(TextureMaterial, Graphics::Material)
public:
	TextureMaterial(void);
	virtual ~TextureMaterial(void);
	virtual void Initialize();
	virtual void Deinitialize();
	virtual void Update(Graphics::RenderableEntity* entity);
	virtual void Render(Graphics::RenderableEntity* entity);

	MATERIAL_PARAM_DECLARATION(WorldViewProjection)
	MATERIAL_PARAM_DECLARATION(AmbientColor)
	MATERIAL_PARAM_DECLARATION(ColorTexture)

protected:
	virtual void BeginRender();
	virtual void EndRender();
};
}
#endif
ConcreteFactory(TextureMaterial, Graphics::Material, Graphics::TextureMaterial)